<template>
	<view :class="themeName">
		<loading-view v-show="loading"></loading-view>
	</view>
</template>

<script type="text/javascript">
	import {
		mapGetters,
		mapActions
	} from 'vuex'
	import Cache from "@/utils/cache";
	import {
		BACK_URL,
	} from "@/config/cachekey";
	export default {
		props: {},
		data() {
			return {
				loading: true
			}
		},
		methods: {
			...mapActions(['getUser']),
		},
		computed: {},
		onLoad() {
			Cache.remove(BACK_URL);
			const options = this.$Route.query
			this.getUser()
				.then((res) => {
					setTimeout(() => {
						if ([0, 2].indexOf(res.level_apply) > -1) {
							this.$Router.replace({
								path: '/bundle2/pages/level_apply/apply_status',
								query: {
									status: res.level_apply
								}
							})
						} else {
							this.$Router.replace({
								path: '/bundle2/pages/level_apply/apply_center',
								query: {
									...options
								}
							})
						}
					}, 200)
				})
		},
	};
</script>

<style lang="scss" scoped>
</style>
